package com.example.tvwanandroid

import android.util.Log
import com.example.tvwanandroid.base.BaseActivity
import com.example.tvwanandroid.bean.ArticleListBean
import com.example.tvwanandroid.bean.BaseCodeBean
import com.example.tvwanandroid.bean.CodeBean
import com.example.tvwanandroid.bean.HotkeyBean
import com.example.tvwanandroid.presenter.HomePresenter
import com.example.tvwanandroid.view.ArticleListView
import okhttp3.RequestBody

class MainActivity : BaseActivity<HomePresenter>(), (ArticleListView) {
    private var body:RequestBody?=null
    private var params:String?=null
    private var codeBean:CodeBean?=null

    override val layoutId: Int
        get() = R.layout.activity_main

    override fun createPresenter(): HomePresenter {
        return HomePresenter(this)
    }

    override fun initView() {
       // presenter!!.articleList(1)
        codeBean = CodeBean()
        codeBean!!.phone="13632390262"
        codeBean!!.country="86"
        presenter!!.getSendCode(codeBean!!)
    }

    override fun addListener() {
       // startA(HomeActivity::class.java)
    }

    override fun onLoadArtList(date: ArticleListBean) {
        Log.d("--data--", date.datas.toString())
    }

    override fun onLoadFriend(date: HotkeyBean) {
    }

    override fun onLoadSendCode(date: BaseCodeBean<Any>) {
        Log.d("--code--", date.toString())
    }

    override fun showLoading() {

    }

    override fun hideLoading() {
    }

}